package day03;

public class OperDemo {
    public static void main(String[] args) {
        int num = 0;
        int flag = num>0?1:-1;
        System.out.println(flag);

        int a = 8, b = 5;
        int max = a>b?a:b;
        System.out.println(max);











        /*
        System.out.println(50+60+""+100);//110100
        System.out.println(""+54+54+""+4);//54544
        System.out.println(50+""+10);//5010
        System.out.println(50+""+100+210+"");//50100210

         */











        /*
        int age = 21;
        System.out.println("age=");
        System.out.println(age);
        System.out.println("age="+age);
        System.out.println("我今年"+age+"岁了");


        String name = "LY";
        System.out.println("大家好，我叫"+name);
        System.out.println("大家好，我叫"+name+"，今年"+age+"岁了");

         */
























        /*
        int a = 5;
        a +=10;
        System.out.println(a);
        a *=2;//相当于a=(int)(a*2)
        System.out.println(a);
        a /= 6;
        System.out.println(a);


        short s = 5;
        //s = s+10;//编译错误，需强转，改为：s=(short)(s+10)
        s += 10;//相当于s=(short)(s+10)

         */















       /*
        int a = 5,b = 10,c = 5;
        */



        /*
        boolean b1 = b>=a && b<c;
        System.out.println(b1);//false
        System.out.println(b<=c && b>a);//false
        System.out.println(a==b && b<a);//false
        System.out.println(b!=c && b>a);//true

        int age = 38;
        System.out.println(age>=18 && age<=50);//年龄在18到50之间
        int score = 86;
        System.out.println(score>=0 && score<=100);//成绩在0到100之间

         */




















        /*
        int a = 5,b = 5;
        int c = a++;
        int d = ++b;
        System.out.println(a);//6
        System.out.println(b);//6
        System.out.println(c);//5
        System.out.println(d);//6

        int e = 5,f = 5;
        e++;
        f++;
        System.out.println(e);//6
        System.out.println(f);//6

         */


        /*
        int a = 5,b = 5;
        int c = a--;
        int d = --b;
        System.out.println(a);//4
        System.out.println(b);//4
        System.out.println(c);//5
        System.out.println(d);//4

         */


        /*
        int a = 5,b = 5;
        a--;
        --b;
        System.out.println(a);//4
        System.out.println(b);//4

         */


    }
}
